<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Module: widgets/xdh-go/menus/circle-menu</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Module: widgets/xdh-go/menus/circle-menu</h1>

    




<section>

<header>
    
        
            
        
    
</header>

<article>
    <div class="container-overview">
    
        
            <div class="description"><p>圆形菜单组件</p></div>
        

        
            















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line2">line 2</a>
    </li></ul></dd>
    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>// with go-menu in gojs
 &lt;go-menu ref="menu1">
   &lt;circle-menu
   :menu-list="listData1"
   </code></pre>



        
    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id=".props"><span class="type-signature">(static) </span>props<span class="type-signature"></span></h4>




<div class="description">
    <p>属性参数</p>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>angleRange</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    [-30, 210]
                
                </td>
            

            <td class="description last"><p>扇形开始位置和结束位置</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>propMap</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    {text: 'text', subMenu: 'subMenu'}
                
                </td>
            

            <td class="description last"><p>参数配置</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>itemKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    'text'
                
                </td>
            

            <td class="description last"><p>菜单的每个菜单项需要有唯一标识，默认为text字段,
有时你不想显示文本，只想显示图标，那么需要指定一个字段作为唯一标识</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>innerRadius</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    60
                
                </td>
            

            <td class="description last"><p>扇形内径大小</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>itemWidth</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>扇形菜单项圈径</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>subRangeLimit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>子菜单的角度范围限制在所设的angleRange范围内,
如果菜单要放在角落里，这个限制是有必要的</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>trigger</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    'click'
                
                </td>
            

            <td class="description last"><p>子菜单触发事件 ['click'|'mouseover']</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>menuList</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    []
                
                </td>
            

            <td class="description last"><p>菜单选项列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>itemStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    {color: '#fff'}
                
                </td>
            

            <td class="description last"><p>菜单项文字样式</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>activeColor</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    'rgba(255, 102, 0, 0.5)'
                
                </td>
            

            <td class="description last"><p>菜单项选中状态颜色</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>normalColor</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    'rgba(140, 197, 255, 0.8)'
                
                </td>
            

            <td class="description last"><p>菜单项非选中状态颜色</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>hoverColor</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    ''
                
                </td>
            

            <td class="description last"><p>菜单项鼠标经过颜色，不设置与选中一样</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fixed</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>设置成true时，不再作为弹出菜单，而是跟随文档流布局</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textRotate</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>设置成true时，菜单项内部文字旋转到正向朝上</p></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line50">line 50</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="~slots"><span class="type-signature">(inner) </span>slots<span class="type-signature"></span></h4>




<div class="description">
    <p>插槽</p>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>'list-item'</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>菜单项</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>'center-btn'</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>中心功能按钮</p></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line23">line 23</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="~calCircle"><span class="type-signature">(inner) </span>calCircle<span class="signature">(arr<span class="signature-attributes">opt</span>, level<span class="signature-attributes">opt</span>, index<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>计算得出根菜单或子菜单的起始角度，圈径等数据</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>菜单数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>level</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>可省，当前点击级别的相关数据，省略时为根菜单</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>可省，当前点击菜单项的下标值</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line211">line 211</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~cxcmmand"><span class="type-signature">(inner) </span>cxcmmand<span class="signature">(event, item, level, index)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>菜单点击事件</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>事件</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>item</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>菜单项对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>level</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>关于菜单层级的信息，包括liWidth, menuWidth, itemAngle,start, innerRadius</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>菜单在第几项</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line311">line 311</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~hide"><span class="type-signature">(inner) </span>hide<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>隐藏菜单</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line410">line 410</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~reduceMenu"><span class="type-signature">(inner) </span>reduceMenu<span class="signature">(reduceTo)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>清除菜单，通常是在点击按钮时，作为固定菜单使用时</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>reduceTo</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>一直删除到剩下数量为reduceTo的菜单, 之所以不用while而用递归，是想通过控制opened属性控制动画的先后</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line376">line 376</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~resetMenu"><span class="type-signature">(inner) </span>resetMenu<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>弹出时或者菜单消失时初始化菜单，通常要在go-menu中调用</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line187">line 187</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="~show"><span class="type-signature">(inner) </span>show<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>显示菜单</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    {left: 0, top: 0}
                
                </td>
            

            <td class="description last"><p>菜单显示时的初始位置</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line397">line 397</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
        <h3 class="subsection-title">Events</h3>

        
            

    

    
    <h4 class="name" id="~event:on-item-click">on-item-click</h4>
    

    



<div class="description">
    <p>搜索框点击搜索按钮时触发</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last"><p>点击事件的原生对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>item</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last"><p>菜单项对象</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="packages_circle-menu_src_circle-menu.vue.html">packages/circle-menu/src/circle-menu.vue</a>, <a href="packages_circle-menu_src_circle-menu.vue.html#line366">line 366</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-utils_directives_draggable.html">utils/directives/draggable</a></li><li><a href="module-utils_directives_resizable.html">utils/directives/resizable</a></li><li><a href="module-utils_events.html">utils/events</a></li><li><a href="module-utils_storage.html">utils/storage</a></li><li><a href="module-widgets_xdh-go_menus_circle-menu.html">widgets/xdh-go/menus/circle-menu</a></li><li><a href="module-xdh-go.html">xdh-go</a></li><li><a href="module-xdh-go-draft.html">xdh-go-draft</a></li><li><a href="module-xdh-go-overview.html">xdh-go-overview</a></li><li><a href="module-xdh-go-snapshot.html">xdh-go-snapshot</a></li><li><a href="module-xdh-html.html">xdh-html</a></li></ul><h3>Classes</h3><ul><li><a href="module-utils_directives_draggable-Draggable.html">Draggable</a></li><li><a href="module-utils_directives_resizable-Resizable.html">Resizable</a></li><li><a href="module-utils_events-Events.html">Events</a></li></ul><h3>Events</h3><ul><li><a href="module-widgets_xdh-go_menus_circle-menu.html#~event:on-item-click">on-item-click</a></li><li><a href="module-xdh-go.html#~event:on-ready">on-ready</a></li></ul><h3>Global</h3><ul><li><a href="global.html#genOption">genOption</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Fri Sep 27 2019 15:45:26 GMT+0800 (GMT+08:00)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>